#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QSettings>
#include <QDebug>
#include <QFile>
#include <QMessageBox>
#include "v4l2api.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButton_close_clicked();

private:
    Ui::MainWindow *ui;
    QSettings *settings;
    void init_config();

/******video.c******/
private:
    char *video_buffer, *video_rgbbuf;
    int video_size;
    int video_refresh_rate;
    V4l2Api *video_v4l2;
    QTimer *video_timer;
    void video_play_Ui();
    void video_init();
public:
    void video_start();
    void video_stop();


};
#endif // MAINWINDOW_H
